<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Source: lib/statuscode.js</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Source: lib/statuscode.js</h1>

    



    
    <section>
        <article>
            <pre class="prettyprint source linenums"><code>/**
 * 状态码列表。请使用get方法获取相应的状态信息。&lt;br>
 * 开发人员可根据状态码信息处理相应的逻辑。&lt;br>
 *
 * @module ChiVoxSDK/lib
 * @author Don Li &lt;kai.li@chivox.com>
 * @licence
 * Copyright (c) 2017 - 2020 ChiVox Inc. All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

const __code = {
    /**
     * @name default
     * @description 未知错误
     */
    "default": {
        id: "",
        description: "未知错误。",
        feedback: {
            en: "Please try again.",
            cn: "请重试。"
        }
    },
    /**
     * @name default2
     * @description 状态码在0-39999之间的出错默认提示信息
     */
    "default2": {
        id: "default",
        description: "",
        feedback: {
            en: "Speech server error. Please contact us to report this.",
            cn: "语音服务器出错，请与我们联系。"
        }
    },
        /**
         * @name default4
         * @description 状态码在40000-49999之间的出错默认提示信息
         */
    "default4": {
        id: "default",
        description: "",
        feedback: {
            en: "Media server error, please try again.",
            cn: "媒体服务器错误，请重试。"
        }
    },
        /**
         * @name default5
         * @description 状态码在50000-59999之间的出错默认提示信息
         */
    "default5": {
        id: "default",
        state: "",
        description: "",
        feedback: {
            en: "Unknown flash error.",
            cn: "未知的Flash错误。"
        }
    },
        /**
         * @name default6
         * @description 状态码在60000-69999之间的出错默认提示信息
         */
    "default6": {
        id: "default",
        description: "",
        feedback: {
            en: "Fatal speech kernal error. Please contact us to report this.",
            cn: "语音内核出现内部错误，请与我们联系。"
        }
    },
        //0-39999
        /**
         * @name 2
         * @description 语音服务器没有检测到语音
         */
    2: {
        id: "2",
        description: "没有检测到语音",
        feedback: {
            en: "Speech server detected no start of the speech, please try again.",
            cn: "没有检测到语音，请重试。"
        }
    },
        /**
         * @name 5
         * @description 评分文本不正确
         */
    5: {
        id: "5",
        description: "评分文本不正确",
        feedback: {
            en: "Incorrect refText.",
            cn: "评分文本不正确。"
        }
    },
        /**
         * @name 6
         * @description refText文本不满足ebnf文法
         */
    6: {
        id: "6",
        description: "refText文本不满足ebnf文法",
        feedback: {
            en: "The refText text does not meet the ebnf grammar.",
            cn: "refText文本不满足ebnf文法。"
        }
    },
        /**
         * @name 400
         * @description Audio Decode Error, 音频解码错误
         */
    400: {
        id: "400",
        description: "Audio Decode Error, 音频解码错误",
        feedback: {
            en: "Audio decode error, please try again.",
            cn: "音频出错，请重试。"
        }
    },
        /**
         * @name 407
         * @description RPC_param error
         */
    407: {
        id: "407",
        description: "RPC_param error",
        feedback: {
            en: "RPC parameter error.",
            cn: "RPC参数不正确"
        }
    },
        /**
         * @name 503
         * @description RPC timeout
         */
    503: {
        id: "503",
        description: "RPC timeout",
        feedback: {
            en: "RPC request timeout.",
            cn: "RPC请求超时"
        }
    },
        /**
         * @name 5501
         * @description  内核跳转内部的参数不符合规则
         */
    5501: {
        id: "5501",
        description: "内核跳转内部的参数不符合规则",
        feedback: {
            en: "Contact us.",
            cn: "联系技术支持。"
        }
    },
        /**
         * @name chivox.AiStatusCode.6001
         */
    6001: {
        id: "6001",
        description: "",
        feedback: {
            en: "",
            cn: ""
        }
    },
        /**
         * @name chivox.AiStatusCode.6002
         */
    6002: {
        id: "6002",
        description: "",
        feedback: {
            en: "",
            cn: ""
        }
    },
    6003: {
        id: "6002",
        description: "",
        feedback: {
            en: "",
            cn: ""
        }
    },
        /**
         * @name 20001
         * @description VAD模块没有检测到语音端点
         */
    20001: {
        id: "20001",
        description: "VAD模块没有检测到语音端点",
        feedback: {
            en: "Speech server detected no start of the speech, please try again.",
            cn: "没有检测到语音，请重试。"
        }
    },
        /**
         * @name 20002
         * @description 输入VAD模块的Package数据为空
         */
    20002: {
        id: "20002",
        description: "输入VAD模块的Package数据为空",
        feedback: {
            en: "Speech server detected no start of the speech, please try again.",
            cn: "没有检测到语音，请重试。"
        }
    },
        /**
         * @name 20101
         * @description 提取的所有F0特征均为0
         */
    20101: {
        id: "20101",
        description: "提取的所有F0特征均为0",
        feedback: {
            en: "Speech server detected no speech, please try again.",
            cn: "没有检测到语音，请重试。"
        }
    },
        /**
         * @name 20102
         * @description 经过特征后处理，没有得到voiced段
         */
    20102: {
        id: "20102",
        description: "经过特征后处理，没有得到voiced段",
        feedback: {
            en: "Speech server detected no speech, please try again.",
            cn: "不能识别该发音，请重试。"
        }
    },
        /**
         * @name 20300
         * @description 识别模块一般性错误
         */
    20300: {
        id: "20300",
        description: "识别模块一般性错误",
        feedback: {
            en: "Speech server detected incompleted speech, please try again.",
            cn: "发音不完整，请重试。"
        }
    },
        /**
         * @name 20301
         * @description 单词没有包含在字典中。需要应用开发者处理，将此类单词反馈给chivox，做添加字典处理。
         */
    20301: {
        id: "20301",
        description: "单词没有包含在字典中。需要应用开发者处理，将此类单词反馈给chivox，做添加字典处理。",
        feedback: {
            en: "Speech server cannot recognise the speech. Please contact us to report this.",
            cn: "单词没有包含在字典中，请检查参考文本是否正确。如果仍有问题，请与我们联系。"
        }
    },
        /**
         * @name 20302
         * @description 没有识别结果, no token suvived
         */
    20302: {
        id: "20302",
        description: "没有识别结果, no token suvived",
        feedback: {
            en: "Speech server cannot recognise the speech. Please try again.",
            cn: "不能识别该发音，请重试。"
        }
    },
        /**
         * @name 20303
         * @description 切分没有结果, no token suvived
         */
    20303: {
        id: "20303",
        description: "切分没有结果, no token suvived",
        feedback: {
            en: "Speech server cannot recognise the speech. Please try again.",
            cn: "不能识别该发音，请重试。"
        }
    },
        /**
         * @name 20401
         * @description 信噪比过低
         */
    20401: {
        id: "20401",
        description: "信噪比过低",
        feedback: {
            en: "Speech is too weak to process, please try again.",
            cn: "您说话的音量太低，请重试。"
        }
    },
        /**
         * @name 20402
         * @description 语音能量过低
         */
    20402: {
        id: "20402",
        description: "语音能量过低",
        feedback: {
            en: "Speech is too weak to process, please try again.",
            cn: "您说话的音量太低，请重试。"
        }
    },
        /**
         * @name 20403
         * @description 语音能量过高
         */
    20403: {
        id: "20403",
        description: "语音能量过高",
        feedback: {
            en: "Speech is too laud to process, please try again.",
            cn: "您说话的音量太高，请重试。"
        }
    },
        /**
         * @name 20404
         * @description 出现截幅现象
         */
    20404: {
        id: "20404",
        description: "出现截幅现象",
        feedback: {
            en: "Speech is too laud to process, please try again.",
            cn: "您说话的音量太高，请重试。"
        }
    },
        // 40000
        /**
         * @name 40001
         * @description 未指定请求参数
         */
    40001: {
        id: "40001",
        state: "未指定请求参数",
        description: "未指定请求参数",
        feedback: {
            en: "",
            cn: "未指定请求参数"
        }
    },
        /**
         * @name 40002
         * @description 未在参数中添加request参数项
         */
    40002: {
        id: "40002",
        state: "未在参数中添加request参数项",
        description: "未在参数中添加request参数项",
        feedback: {
            en: "",
            cn: "未在参数中添加request参数项"
        }
    },
        /**
         * @name 40400
         * @description 请求的内核资源不存在
         */
    40400: {
        id: "40400",
        state: "请求的内核资源不存在",
        description: "请求的内核资源不存在",
        feedback: {
            en: "",
            cn: "请求的内核资源不存在"
        }
    },
        /**
         * @name 40092
         * @description 传输的音频时长超限
         */
    40092: {
        id: "40092",
        state: "传输的音频时长超限",
        description: "传输的音频时长超限",
        feedback: {
            en: "",
            cn: "传输的音频时长超限"
        }
    },
        /**
         * @name 41001
         * @description 参数非JSON格式
         */
    41001: {
        id: "41001",
        state: "参数非JSON格式",
        description: "参数非JSON格式",
        feedback: {
            en: "",
            cn: "参数非JSON格式"
        }
    },
        /**
         * @name 41002
         * @description 控制消息的格式出错没有cmd项
         */
    41002: {
        id: "41002",
        state: "控制消息的格式出错没有cmd项",
        description: "控制消息的格式出错没有cmd项",
        feedback: {
            en: "",
            cn: "控制消息的格式出错没有cmd项"
        }
    },
        /**
         * @name 41004
         * @description 控制消息的格式出错没有param项
         */
    41004: {
        id: "41004",
        state: "控制消息的格式出错没有param项",
        description: "控制消息的格式出错没有param项",
        feedback: {
            en: "",
            cn: "控制消息的格式出错没有param项"
        }
    },
        /**
         * @name 41007
         * @description 未传输音频格式
         */
    41007: {
        id: "41007",
        state: "未传输音频格式",
        description: "未传输音频格式",
        feedback: {
            en: "",
            cn: "未传输音频格式"
        }
    },
        /**
         * @name 41008
         * @description 音频格式不支持
         */
    41008: {
        id: "41008",
        state: "音频格式不支持",
        description: "音频格式不支持",
        feedback: {
            en: "",
            cn: "音频格式不支持"
        }
    },
        /**
         * @name 41009
         * @description 音频信息不合法
         */
    41009: {
        id: "41009",
        state: "音频信息不合法",
        description: "音频信息不合法",
        feedback: {
            en: "",
            cn: "音频信息不合法"
        }
    },
        /**
         * @name 41010
         * @description 音频信息不合法
         */
    41010: {
        id: "41010",
        state: "音频信息不合法",
        description: "音频信息不合法",
        feedback: {
            en: "",
            cn: "音频信息不合法"
        }
    },
        /**
         * @name 41011
         * @description 音频信息不合法
         */
    41011: {
        id: "41011",
        state: "音频信息不合法",
        description: "音频信息不合法",
        feedback: {
            en: "",
            cn: "音频信息不合法"
        }
    },
        /**
         * @name 41012
         * @description 未传输音频信息
         */
    41012: {
        id: "41012",
        state: "未传输音频信息",
        description: "未传输音频信息",
        feedback: {
            en: "",
            cn: "未传输音频信息"
        }
    },
        /**
         * @name 41014
         * @description request中的信息不合法
         */
    41014: {
        id: "41014",
        state: "request中的信息不合法",
        description: "request中的信息不合法",
        feedback: {
            en: "",
            cn: "request中的信息不合法"
        }
    },
        /**
         * @name 41015
         * @description 参数中有遗漏或不合法
         */
    41015: {
        id: "41015",
        state: "参数中有遗漏或不合法",
        description: "参数中有遗漏或不合法",
        feedback: {
            en: "",
            cn: "参数中有遗漏或不合法"
        }
    },
        /**
         * @name 41016
         * @description 参数中有遗漏或不合法
         */
    41016: {
        id: "41016",
        state: "参数中有遗漏或不合法",
        description: "参数中有遗漏或不合法",
        feedback: {
            en: "",
            cn: "参数中有遗漏或不合法"
        }
    },
        /**
         * @name 41017
         * @description 参数中有遗漏或不合法
         */
    41017: {
        id: "41017",
        state: "参数中有遗漏或不合法",
        description: "参数中有遗漏或不合法",
        feedback: {
            en: "",
            cn: "参数中有遗漏或不合法"
        }
    },
        /**
         * @name 41018
         * @description 参数中有遗漏或不合法
         */
    41018: {
        id: "41018",
        state: "参数中有遗漏或不合法",
        description: "参数中有遗漏或不合法",
        feedback: {
            en: "",
            cn: "参数中有遗漏或不合法"
        }
    },
        /**
         * @name 41019
         * @description 参数中有遗漏或不合法
         */
    41019: {
        id: "41019",
        state: "参数中有遗漏或不合法",
        description: "参数中有遗漏或不合法",
        feedback: {
            en: "",
            cn: "参数中有遗漏或不合法"
        }
    },
        /**
         * @name 41020
         * @description 参数中有遗漏或不合法
         */
    41020: {
        id: "41020",
        state: "参数中有遗漏或不合法",
        description: "参数中有遗漏或不合法",
        feedback: {
            en: "",
            cn: "参数中有遗漏或不合法"
        }
    },
        /**
         * @name 41021
         * @description 参数中有遗漏或不合法
         */
    41021: {
        id: "41021",
        state: "参数中有遗漏或不合法",
        description: "参数中有遗漏或不合法",
        feedback: {
            en: "",
            cn: "参数中有遗漏或不合法"
        }
    },
        /**
         * @name 41022
         * @description 参数中有遗漏或不合法
         */
    41022: {
        id: "41022",
        state: "参数中有遗漏或不合法",
        description: "参数中有遗漏或不合法",
        feedback: {
            en: "",
            cn: "参数中有遗漏或不合法"
        }
    },
        /**
         * @name 41023
         * @description 参数中有遗漏或不合法
         */
    41023: {
        id: "41023",
        state: "参数中有遗漏或不合法",
        description: "参数中有遗漏或不合法",
        feedback: {
            en: "",
            cn: "参数中有遗漏或不合法"
        }
    },
        /**
         * @name 41024
         * @description 参数中有遗漏或不合法
         */
    41024: {
        id: "41024",
        state: "参数中有遗漏或不合法",
        description: "参数中有遗漏或不合法",
        feedback: {
            en: "",
            cn: "参数中有遗漏或不合法"
        }
    },
        /**
         * @name 41025
         * @description 参数中有遗漏或不合法
         */
    41025: {
        id: "41025",
        state: "参数中有遗漏或不合法",
        description: "参数中有遗漏或不合法",
        feedback: {
            en: "",
            cn: "参数中有遗漏或不合法"
        }
    },
        /**
         * @name 41030
         * @description auth验证未通过
         */
    41030: {
        id: "41030",
        state: "auth验证未通过",
        description: "auth验证未通过",
        feedback: {
            en: "",
            cn: "auth验证未通过"
        }
    },
        /**
         * @name 41031
         * @description auth验证异常
         */
    41031: {
        id: "41031",
        state: "auth验证异常",
        description: "auth验证异常",
        feedback: {
            en: "",
            cn: "auth验证异常"
        }
    },
        /**
         * @name 41032
         * @description auth验证异常
         */
    41032: {
        id: "41032",
        state: "auth验证异常",
        description: "auth验证异常",
        feedback: {
            en: "",
            cn: "auth验证异常"
        }
    },
        /**
         * @name 42003
         * @description 请求的内核资源不存在
         */
    42003: {
        id: "42003",
        state: "客户端发送请求的顺序出错",
        description: "客户端发送请求的顺序出错",
        feedback: {
            en: "",
            cn: "客户端发送请求的顺序出错"
        }
    },
        /**
        */
    0: {
        id: "",
        state: "",
        description: "",
        feedback: {
            en: "",
            cn: ""
        }
    },
        // special 50000-79999
        /**
        */
    51000: {
        id: "51000",
        state: "初始化内核出错",
        description: "初始化内核出错",
        feedback: {
            en: "",
            cn: "初始化内核出错"
        }
    },
        /**
         * @name 51001
         * @description feed音频给内核时出错
         */
    51001: {
        id: "51001",
        state: "feed音频给内核时出错",
        description: "feed音频给内核时出错",
        feedback: {
            en: "",
            cn: "feed音频给内核时出错"
        }
    },
        /**
         * @name 51002
         * @description 生成内核结果时出错
         */
    51002: {
        id: "51002",
        state: "生成内核结果时出错",
        description: "生成内核结果时出错",
        feedback: {
            en: "",
            cn: "生成内核结果时出错"
        }
    },
        /**
         * @name 52000
         * @description 集群进程资源短缺
         */
    52000: {
        id: "52000",
        state: "集群进程资源短缺",
        description: "集群进程资源短缺",
        feedback: {
            en: "",
            cn: "集群进程资源短缺"
        }
    },
        /**
         * @name 53000
         * @description 内核进程崩溃
         */
    53000: {
        id: "53000",
        state: "内核进程崩溃",
        description: "内核进程崩溃",
        feedback: {
            en: "",
            cn: "内核进程崩溃"
        }
    },
        /**
         * @name 55200
         * @description 内核跳转出错
         */
    55200: {
        id: "55200",
        state: "内核跳转出错",
        description: "内核跳转出错",
        feedback: {
            en: "",
            cn: "内核跳转出错"
        }
    },
        /**
         * @name 55201
         * @description 内核跳转出错
         */
    55201: {
        id: "55201",
        state: "内核跳转出错",
        description: "内核跳转出错",
        feedback: {
            en: "",
            cn: "内核跳转出错"
        }
    },
        /**
         * @name 55202
         * @description 内核跳转出错
         */
    55202: {
        id: "55202",
        state: "内核跳转出错",
        description: "内核跳转出错",
        feedback: {
            en: "",
            cn: "内核跳转出错"
        }
    },
        /**
         * @name 70001
         * @description SDK版本需要升级
         */
    70001: {
        id: "70001",
        state: "SDK版本需要升级",
        description: "SDK版本需要升级",
        feedback: {
            en: "",
            cn: "SDK版本需要升级"
        }
    },
        //50000
        /**
         * @name 50000
         * @description 当加载flash 完成时（这里说的完成，指的是自己已经完成了初始化，并且和JS 握手成功后），触发此消息回调&lt;br>
         */
    50000: {
        id: "50000",
        state: "FLASH_LOAD_COMPLETE",
        description: "当加载flash 完成时（这里说的完成，指的是自己已经完成了初始化，并且和JS 握手成功后），触发此消息回调",
        feedback: {
            en: "Flash load success.",
            cn: "Flash加载成功。"
        }
    },
        /**
         * @name 50001
         * @description 当mic 初始化时会调用检测mic 是否允许的函数，如果检测结果是允许，那么触发此消息回调；如果从禁用状态下，用户通过设置，手动允许了mic，也会触发此消息回调&lt;br>
         */
    50001: {
        id: "50001",
        state: "MIC_UNMUTED",
        description: "当mic 初始化时会调用检测mic 是否允许的函数 ， 如果检测结果是允许，那么触发此消息回调； 如果从禁用状态下， 用户通过设置，手动允许了mic，也会触发此消息回调",
        feedback: {
            en: "Microphone is allowed.",
            cn: "Flash可以访问麦克风。"
        }
    },
        /**
         * @name 50002
         * @description 当mic 初始化时会调用检测mic 是否允许的函数，如果检测结果是 不允许，那么触发此消息回调；如果从允许状态下， 用户通过设置，手动禁用了mic，也会触发此消息回调&lt;br>
         */
    50002: {
        id: "50002",
        state: "MIC_MUTED",
        description: "当mic 初始化时会调用检测mic 是否允许的函数，如果检测结果是 不允许，那么触发此消息回调；如果从允许状态下， 用户通过设置，手动禁用了mic，也会触发此消息回调",
        feedback: {
            en: "Microphone is not allowed, please check for Flash Player's Setting panel.",
            cn: "Flash不能访问麦克风，请检查设置。"
        }
    },
        /**
         * @name 50003
         * @description 当mic 初始化时会调用检测mic 是否允许的函数， 如果检测不到mic，那么回触发此消息回调&lt;br>
         */
    50003: {
        id: "50003",
        state: "MIC_NOT_FOUND",
        description: "当mic 初始化时会调用检测mic 是否允许的函数， 如果检测不到mic，那么回触发此消息回调",
        feedback: {
            en: "Found no Microphone device, please check for it.",
            cn: "没有找到麦克风设备，请检查。"
        }
    },
        /**
         * @name 50004
         * @description 当调用函数时，传参正确时，直接函数返回值返回此消息
         */
    50004: {
        id: "50004",
        state: "FUNCTION_EXECUTE_SUCCESSFUL",
        description: "当调用函数时，传参正确时，直接函数返回值返回此消息",
        feedback: {
            en: "Function is executed",
            cn: "函数执行成功。"
        }
    },
        /**
         * @name 50005
         * @description 当调用函数时，传参不正确时，返回此消息
         */
    50005: {
        id: "50005",
        state: "EXCEPTION_PARAMETER_ERROR",
        description: "当调用函数时，传参不正确时，返回此消息",
        feedback: {
            en: "Parameters error, usually due to serverParam not provided.",
            cn: "参数错误，可能是 serverParam 错误。"
        }
    },
        /**
         * @name 50006
         * @description 当调用函数时，传参不正确时，返回此消息
         */
    50006: {
        id: "50006",
        state: "EXCEPTION_RECORDERLIB_ERROR",
        description: "当调用函数时，传参不正确时，返回此消息",
        feedback: {
            en: "RecorderLib instance not initialised.",
            cn: "录音机未初始化。"
        }
    },
        /**
         * @name 50007
         * @description 检测到mms.cfg文件中的avHardwareDisable配置有误，请手动修改或删除 mms.cfg文件
         */
    50007: {
        id: "50007",
        state: "MMSCFG_INVALID",
        description: "检测到mms.cfg文件中的avHardwareDisable配置有误，请手动修改或删除 mms.cfg文件",
        feedback: {
            en: "The mms.cfg file is not configured correctly, please delete it manually.",
            cn: "mms.cfg文件配置不正确，请手动删除。"
        }
    },
        /**
         * @name 50008
         * @description 在flash允许状态下，点击了flash面板上的关闭按钮，触发的此事件
         */
    50008: {
        id: "50008",
        state: "MIC_PANEL_CLOSED",
        description: "在flash允许状态下，第一次点击flash面板上的关闭按钮，触发的此事件",
        feedback: {
            en: "Click the close button on flash panel",
            cn: "点击了flash上的关闭按钮"
        }
    },
        /**
         * @name 50100
         * @description 当连接上流媒体服务器时触发此消息回调&lt;br>
         */
    50100: {
        id: "50100",
        state: "WS_CONNECT_SUCCESSFUL",
        description: "当连接上流媒体服务器时触发此消息回调",
        feedback: {
            en: "Successful to connect media server.",
            cn: "录音服务器连接成功。"
        }
    },
        /**
         * @name 50103
         * @description 已经连上服务器，但是服务器端主动断开了连接时，触发此消息回调&lt;br>
         */
    50103: {
        id: "50103",
        state: "WS_CONNECT_CLOSED",
        description: "已经连上服务器，但是服务器端主动断开了连接时，触发此消息回调",
        feedback: {
            en: "Connection to the media server is closed.",
            cn: "录音服务器断开了连接。"
        }
    },
        /**
         * @name 50107
         * @description 当前台调用函数startRecord 或startReplay 时，如果此时未连接上流媒体服务器， 那么将会触发此消息回调
         */
    50107: {//FIXME startRecord没有回调50106
        id: "50107",
        state: "AUTH_FAILED",
        description: "",
        feedback: {
            en: "AUTH_FAILED.",
            cn: "授权失败。"
        }
    },
        /**
         * @name 50012
         * @description 录音机在尝试重新连接服务器，但是实际已经连接时，返回给js。&lt;br>
         */
    50012: {
        id: "50012",
        state: "NET_ALREADY_CONNECTED",
        description: "录音机在尝试重新连接服务器，但是实际已经连接时，时返回给js。",
        feedback: {
            en: "Net is already connected.",
            cn: "网络已经连接。"
        }
    },
        /**
         * @name 50200
         * @description 当录音结束，录音机从服务器端取得内核反馈结果时，触发此消息回调，录音结果将直接存放在回调的msg 参数中，为json对象格式&lt;br>
         */
    50200: {
        id: "50200",
        state: "CORE_REQUEST_SUCCESS",
        description: "当录音结束，录音机从服务器端取得内核反馈结果时，触发此消息回调，录音结果将直接存放在回调的msg 参数中，为json对象格式",
        feedback: {
            en: "Core request success.",
            cn: "评分成功。"
        }
    },
        /**
         * @name 50201
         * @description 当录音结束后，在设定的时间内，服务器没有给反馈，则触发此消息回调，flash 录音机将不会再对这次录音有任何反馈&lt;br>
         */
    50201: {
        id: "50201",
        state: "CORE_REQUEST_TIMEOUT",
        description: "当录音结束后，在设定的时间内，服务器没有给反馈，则触发此消息回调，flash 录音机将不会再对这次录音有任何反馈",
        feedback: {
            en: "Request to contact the speech server is time out.",
            cn: "评分超时。"
        }
    },
        /**
         * @name 50202
         * @description 服务器参数错误&lt;br>
         */
    50202: {
        id: "50202",
        state: "SERVER_PARAMS_ERROR",
        description: "录音机向服务器发送的数据不完整",
        feedback: {
            en: "Get score failed, please try again.",
            cn: "评分失败，请重试。"
        }
    },
        /**
         * @name 50300
         * @description 当录音结束时，触发此消息回调。子状态：&lt;br>
         * stopType, "0"表示自动停止的，"1"表示手动停止的&lt;br>
         */
    50300: {
        id: "50300",
        state: "RECORD_STOP",
        description: "当录音结束时，触发此消息回调" +
            '子状态 stopType, "0"表示 自动停止的 ， "1"表示 手动停止的',
        feedback: {
            en: "Recording stopped.",
            cn: "录音停止。"
        }
    },
        /**
         * @name 50301
         * @description 当录音真正开始时，触发此消息回调&lt;br>
         */
    50301: {
        id: "50301",
        state: "RECORD_START",
        description: "当录音真正开始时，触发此消息回调",
        feedback: {
            en: "Recording started",
            cn: "录音开始。"
        }
    },
        /**
         * @name 50302
         * @description 回放结束&lt;br>
         */
    50302: {
        id: "50302",
        state: "REPLAY_STOP",
        description: "回放结束",
        feedback: {
            en: "Replaying stopped.",
            cn: "回放停止"
        }
    },
        /**
         * @name 50303
         * @description 回放开始&lt;br>
         */
    50303: {
        id: "50303",
        state: "REPLAY_START",
        description: "回放开始",
        feedback: {
            en: "Replaying start.",
            cn: "回放开始。"
        }
    },
        /**
         * @name 50304
         * @description 当在开始录音前，获得录音recordId 时，触发此消息回调&lt;br>
         */
    50304: {
        id: "50304",
        state: "TOKENID_GETTED",
        description: "当在开始录音前，获得录音tokenId 时，触发此消息回调",
        feedback: {
            en: "TokenId generated.",
            cn: "获得录音ID成功。"
        }
    },
        /**
         * @name 50306
         * @description 在麦克风音量发生改变时，触发此消息回调&lt;br>
         */
    50306: {
        id: "50306",
        state: "RECORD_MICROPHONE_GAN_CHANGED",
        description: "在麦克风音量发生改变时，触发此消息回调",
        feedback: {
            en: "Microphone gan changed.",
            cn: "麦克风音量发生了改变。"
        }
    },
        /**
         * @name 50353
         * @description 录音机在调用函数时的状态错误，子状态有：&lt;br>
         * CANNOT_BE_RECORDING = "status.invalid:recording"&lt;br>
         * CANNOT_BE_IDLE = "status.invalid:idle"&lt;br>
         * CANNOT_BE_REPLAYING = "status.invalid:replaying"&lt;br>
         * CANNOT_BE_NOT_READY = "status.invalid:not_ready"&lt;br>
         * CANNOT_BE_INIT = "status.invalid:init"
         */
    50353: {
        id: "50353",
        state: "ERROR_RECORDER_STATUS_ERROR",
        description: "录音机在调用函数时的状态错误，子状态有：&lt;br>" +
            'CANNOT_BE_RECORDING = "status.invalid:recording"&lt;br>' +
            'CANNOT_BE_IDLE = "status.invalid:idle"&lt;br>' +
            'CANNOT_BE_REPLAYING = "status.invalid:replaying"&lt;br>' +
            'CANNOT_BE_NOT_READY = "status.invalid:not_ready"&lt;br>' +
            'CANNOT_BE_INIT = "status.invalid:init"',
        feedback: {
            en: "Recorder status error.",
            cn: "调用函数前，录音机状态不正确。"
        }
    },
        /**
         * @name 50354
         * @description 未找到该tokenId的本地音频&lt;br>
         */
    50354: {
        id: "50354",
        state: "ERROR_RECORDER_STATUS_ERROR",
        description: "未找到该tokenId的本地音频：&lt;br>",
        feedback: {
            en: "Recorder status error.",
            cn: "未找到该tokenId的本地音频。"
        }
    },

        /**
         * @name 50355
         * @description 在使用录音机尝试回放，但是没有找到任何音频时返回。&lt;br>
         */
    50355: {
        id: "50355",
        state: "EXCEPTION_NO_RECORD",
        description: "在使用录音机尝试回放，但是没有找到任何音频时返回。",
        feedback: {
            en: "No local cached record, usually due to not making a record.",
            cn: "无回放缓存文件。可能从未录音过。"
        }
    },
        /**
         * @name 50401
         * @description 调用startAudioPlay()后，回调消息&lt;br>
         */
    50400: {
        id: "50400",
        state: "PLAYER_AUDIO_LOAD_COMPLETED",
        description: "在播放前，音频加载成功时，回调消息。如果加载时的url使用的是http协议则表示加载mp3完成， 如果是rtmp协议则表示连接流媒体服务器成功",
        feedback: {
            en: "Audio load success.",
            cn: "加载音频成功。"
        }
    },
        /**
         * @name 50401
         * @description 调用startAudioPlay()后，回调消息&lt;br>
         */
    50401: {
        id: "50401",
        state: "调用startAudioPlay()后，回调消息",
        description: "PLAY_START",
        feedback: {
            en: "Playing started.",
            cn: "播放开始。"
        }
    },
        /**
         * @name 50402
         * @description 调用stopAudioPlay()后，或音频自动播放停止后， 回调消息。子状态：&lt;br>
         * stopType: "0"代表自动停止，"1"代表手动停止&lt;br>
         */
    50402: {
        id: "50402",
        state: "PLAY_STOP",
        description: "调用stopAudioPlay()后，或音频自动播放停止后， 回调消息。子状态：&lt;br>" +
            'stopType: "0"代表自动停止，"1"代表手动停止',
            feedback: {
                en: "Playing stopped.",
                cn: "播放停止。"
            }
    },
        /**
         * @name 50405
         * @description 在播放中调用pauseAudioPlay()时，回调消息&lt;br>
         */
    50405: {
        id: "50405",
        state: "在播放中调用pauseAudioPlay()时，回调消息",
        description: "PLAY_PAUSE",
        feedback: {
            en: "Playing paused.",
            cn: "播放暂停。"
        }
    },
        /**
         * @name 50406
         * @description 在播放中调用resumeAudioPlay()时，回调消息&lt;br>
         */
    50406: {
        id: "50406",
        state: "PLAY_RESUME",
        description: "在播放中调用resumeAudioPlay()时，回调消息",
        feedback: {
            en: "Playing resumed.",
            cn: "播放恢复。"
        }
    },
        /**
         * @name 50409
         * @description 播放时，没有找到文件时，回调消息&lt;br>
         */
    50409: {
        id: "50409",
        state: "PLAY_FILE_NOT_FOUND",
        description: "播放时，没有找到文件时，回调消息",
        feedback: {
            en: "Targeting audio file does not exist.",
            cn: "没有找到目标文件。"
        }
    },
        /**
         * @name 50410
         * @description 播放音频时，服务器端出现错误时，回调消息，但是并不是指播放音频已经停止了，而是还在继续，具体是什么错误， 需要查询服务器日志&lt;br>
         */
    50410: {
        id: "50410",
        state: "PLAY_SERVER_ERROR",
        description: "播放音频时，服务器端出现错误时，回调消息，但是并不是指播放音频已经停止了，而是还在继续，具体是什么错误， 需要查询服务器日志",
        feedback: {
            en: "Play failed, please try again.",
            cn: "播放出错。"
        }
    },
        /**
         * @name 50414
         * @description 播放器在开始连接服务器时回调js，接口是load方法的start回调
         */
    50414: {
        id: "50414",
        state: "PLAYER_LOAD_START",
        description: "播放器在开始连接服务器时回调js，接口是load方法的start回调",
        feedback: {
            en: "Player load start.",
            cn: "播放器开始加载音频。"
        }
    },
        /**
         * @name 50450
         * @description 调用startAudioPlay()时，发现播放参数错误，方法直接返回消息
         */
    50450: {
        id: "50450",
        state: "ERROR_STARTPLAY_PARAMETER_ERROR",
        description: "调用startAudioPlay()时，发现播放参数错误，方法直接返回消息",
        feedback: {
            en: "StartPlay parameter error.",
            cn: "播放参数错误"
        }
    },
        /**
         * @name 50451
         * @description 调用loadAudioFromURL()时，发现load参数错误，方法直接返回消息
         */
    50451: {
        id: "50451",
        state: "ERROR_LOADAUDIO_PARAMETER_ERROR",
        description: "调用loadAudioFromURL()时，发现load参数错误，方法直接返回消息",
        feedback: {
            en: "LoadAudio parameter error.",
            cn: "加载音频参数错误"
        }
    },
        /**
         * @name 50452
         * @description 调用adjustVolume()时，发现此方法的参数有错误， 方法直接返回消息
         */
    50452: {
        id: "50452",
        state: "ERROR_ADJUSTVOLUME_PARAMETER_ERROR",
        description: "调用adjustVolume()时，发现此方法的参数有错误， 方法直接返回消息",
        feedback: {
            en: "AdjustVolume parameter error.",
            cn: "调节音量参数错误。"
        }
    },
        /**
         * @name 50453
         * @description 当开始传flashVars 中参数有错误时，回调此消息
         */
    50453: {
        id: "50453",
        state: "ERROR_PLAYER_FLASHVARS_ERROR",
        description: "当开始传flashVars 中参数有错误时，回调此消息",
        feedback: {
            en: "Flashvars parameter error.",
            cn: "Flash参数错误。"
        }
    },
        /**
         * @name 50454
         * @description 当调用某函数时，发现状态错误时，触发此消息。子状态：&lt;br>
         * CANNOT_BE_IDLE = "status.invalid:idle"&lt;br>
         * CANNOT_BE_NOT_READY = "status.invalid:not_ready"&lt;br>
         * CANNOT_BE_INIT = "status.invalid:init"&lt;br>
         * CANNOT_BE_PLAYING = "status.invalid:playing"&lt;br>
         * CANNOT_BE_LOADING = "status.invalid:loading"&lt;br>
         * CANNOT_BE_PAUSE = "status.invalid:pause"&lt;br>
         * CANNOT_BE_BUFFERING = "status.invalid:buffering"&lt;br>
         * CANNOT_BE_LOADED = "status.invalid:loaded"
         */
    50454: {
        id: "50454",
        state: "ERROR_PLAYER_STATUS_ERROR",
        description: "当调用某函数时，发现状态错误时，触发此消息。子状态： " +
            'CANNOT_BE_IDLE = "status.invalid:idle"&lt;br>' +
            'CANNOT_BE_NOT_READY = "status.invalid:not_ready"&lt;br>' +
            'CANNOT_BE_INIT = "status.invalid:init"&lt;br>' +
            'CANNOT_BE_PLAYING = "status.invalid:playing"&lt;br>' +
            'CANNOT_BE_LOADING = "status.invalid:loading"&lt;br>' +
            'CANNOT_BE_PAUSE = "status.invalid:pause"&lt;br>' +
            'CANNOT_BE_BUFFERING = "status.invalid:buffering"&lt;br>' +
            'CANNOT_BE_LOADED = "status.invalid:loaded"s',
        feedback: {
            en: "Player status error.",
            cn: "调用函数前，播放器状态不正确。"
        }
    },

        /**
         * @name 50501
         * @description DEPENDENCY_READY
         */
    50500: {
        id: "50500",
        state: "DEPENDENCY_READY",
        description: "DEPENDENCY_READY",
        feedback: {
            en: "DEPENDENCY_READY",
            cn: "DEPENDENCY_READY。"
        }
    },

        /**
         * @name 50501
         * @description EXCEPTION_FACTORY_TIMEOUT
         */
    50501: {
        id: "50501",
        state: "EXCEPTION_FACTORY_TIMEOUT",
        description: "EXCEPTION_FACTORY_TIMEOUT",
        feedback: {
            en: "EXCEPTION_FACTORY_TIMEOUT",
            cn: "EXCEPTION_FACTORY_TIMEOUT。"
        }
    }
};

/**
 * StatusCode类。&lt;br/>&lt;br/>
 *
 * 根据状态代码获得状态信息。&lt;br>
 * 返回的对象至少包含这几个字段：id, description, feedback
 * @param {string} code
 * @params {string} language 语言，可选值为"en","cn"。默认为"en"
 * @return {object}
 */
class StatusCode {
    /**
     * 根据状态代码获得状态信息。&lt;br>
     * 返回的对象至少包含这几个字段：id, description, feedback
     *
     * @param {string} code
     * @params {string} language 语言，可选值为"en","cn"。默认为"en"
     * @return {object}
     */
    static get(code, language) {
        var r = { id: code, description: "未知错误。", state: "", feedback: { en: "Please try again.", cn: "请重试。" } };

        if (code == "NO_DATA") {
            r = { id: code, state: "NO_DATA", description: "指定之间内获取录音ID失败", feedback: { en: "Recording failed, please try again.", cn: "录音失败，请重试。" } };
        } else if (code == "TIMEOUT") {
            r = { d: code, state: "TIMEOUT", description: "指定之间内评分失败", feedback: { en: "Core request timeout, please try again.", cn: "评分超时，请重试。" } };
        } else {
            if (typeof __code[code] !== "undefined") {
                var result = __code[code];
                r.id = result.id;
                r.state = result.state || "";
                r.description = result.description;
                r.feedback = result.feedback;
            } else {
                var s = code.toString();
                var i = s.charAt(0);
                var iCode = parseFloat(code);
                if (iCode >= 0 &amp;&amp; iCode &lt;= 39999) {
                    r = __code["default2"];
                } else if (iCode >= 40000 &amp; iCode &lt;= 69999) {
                    r = __code["default" + i];
                }
            }
        }
        if (language == "cn") {
            r.feedback = (r.feedback &amp;&amp; r.feedback.cn) || r.feedback;
        } else {
            r.feedback = (r.feedback &amp;&amp; r.feedback.en) || r.feedback;
        }
        if (r.id &amp;&amp; r.feedback) {
            r.feedback = r.id + ": " + r.feedback;
        }
        return r;
    }

    static trySet(code, description) {
        if (typeof __ode[code] === "undefined") {
            __code[code] = { id: "error", description: description,
                feedback: { en: description, cn: description }
            };
        }
    }
}

export default StatusCode
</code></pre>
        </article>
    </section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-ChiVoxSDK.html">ChiVoxSDK</a></li><li><a href="module-ChiVoxSDK_flash.html">ChiVoxSDK/flash</a></li><li><a href="module-ChiVoxSDK_html5.html">ChiVoxSDK/html5</a></li><li><a href="module-ChiVoxSDK_lib.html">ChiVoxSDK/lib</a></li><li><a href="module-ChiVoxSDK_Paragraph.html">ChiVoxSDK/Paragraph</a></li><li><a href="module-ChiVoxSDK_score.html">ChiVoxSDK/score</a></li></ul><h3>Classes</h3><ul><li><a href="module-ChiVoxSDK_flash.FlashPlayer.html">FlashPlayer</a></li><li><a href="module-ChiVoxSDK_flash.FlashRecorder.html">FlashRecorder</a></li><li><a href="module-ChiVoxSDK_html5.Html5Player.html">Html5Player</a></li><li><a href="module-ChiVoxSDK_html5.Html5Recorder.html">Html5Recorder</a></li><li><a href="module-ChiVoxSDK_html5-VolumeBar.html">VolumeBar</a></li><li><a href="module-ChiVoxSDK_lib-EnScoreMap.html">EnScoreMap</a></li><li><a href="module-ChiVoxSDK_lib-StatusCode.html">StatusCode</a></li><li><a href="module-ChiVoxSDK_Paragraph-Paragraph.html">Paragraph</a></li><li><a href="module-ChiVoxSDK_score-Char.html">Char</a></li><li><a href="module-ChiVoxSDK_score-CnSentScore.html">CnSentScore</a></li><li><a href="module-ChiVoxSDK_score-CnWordScore.html">CnWordScore</a></li><li><a href="module-ChiVoxSDK_score-EnSentRec.html">EnSentRec</a></li><li><a href="module-ChiVoxSDK_score-EnSentScore.html">EnSentScore</a></li><li><a href="module-ChiVoxSDK_score-EnWordScore.html">EnWordScore</a></li><li><a href="module-ChiVoxSDK_score-Phone.html">Phone</a></li><li><a href="module-ChiVoxSDK_score-Word.html">Word</a></li><li><a href="module-ChiVoxSDK-ChiVoxSDK.html">ChiVoxSDK</a></li><li><a href="module-ChiVoxSDK-ControlPanel.html">ControlPanel</a></li><li><a href="module-ChiVoxSDK-Dialog.html">Dialog</a></li><li><a href="module-ChiVoxSDK-PlayerBuilder.html">PlayerBuilder</a></li><li><a href="module-ChiVoxSDK-ProgressBar.html">ProgressBar</a></li><li><a href="module-ChiVoxSDK-RecorderBuilder.html">RecorderBuilder</a></li></ul><h3>Namespaces</h3><ul><li><a href="public.html">public</a></li><li><a href="Utils.html">Utils</a></li></ul><h3>Global</h3><ul><li><a href="global.html#Default_ChiVoxPlayer_Options">Default_ChiVoxPlayer_Options</a></li><li><a href="global.html#Default_ChiVoxRecorder_Options">Default_ChiVoxRecorder_Options</a></li><li><a href="global.html#Default_ChiVoxSDK_Options">Default_ChiVoxSDK_Options</a></li><li><a href="global.html#Default_Paragraph_Options">Default_Paragraph_Options</a></li><li><a href="global.html#get_sig">get_sig</a></li><li><a href="global.html#tts">tts</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Sep 21 2017 16:38:41 GMT+0800 (CST)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>
